@extends("backend.layout.main")

@section("before.css")


    <link type="text/css" href="/assets/backend/css/style2.css" rel="Stylesheet">
    <link type="text/css" href="/assets/backend/css/project.css" rel="Stylesheet">
    <link type="text/css" href="/assets/backend/css/webuploader.css" rel="Stylesheet">
    <link type="text/css" href="/assets/backend/css/animate.min.css" rel="Stylesheet">
    <link type="text/css" href="/assets/backend/css/normalize.css" rel="Stylesheet">


@endsection
@section("right_content")

    <script type="text/javascript">



        function timer(intDiff,day1,hour1,minute1,second1){

            window.setInterval(function(){
                var day=0,
                        hour=0,
                        minute=0,
                        second=0;//时间默认值
                if(intDiff > 0){
                    day = Math.floor(intDiff / (60 * 60 * 24));
                    hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
                    minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
                    second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
                }
                if (minute <= 9) minute = '0' + minute;
                if (second <= 9) second = '0' + second;

                $('#'+day1).html(day+"天");
                $('#'+hour1).html('<s id="h"></s>'+hour+'时');
                $('#'+minute1).html('<s></s>'+minute+'分');
                $('#'+second1).html('<s></s>'+second+'秒');
                intDiff--;
            }, 1000);
        }

        $(function(){
            $('.check').click(function(){
                var action=$(this).data('action');
                var id=$(this).data('id');
                var _Token="{{ csrf_token() }}";
                //var action=$(this).data('action');
                $.post('/backend/work/audit',{action:action,id:id,_Token:_Token},function(data){
                    if(data==1){
                        alert("已通知相关人员处理！");
                        location.href="/backend/work";
                    }else {
                        alert("操作失败，请重试！");
                        location.href="/backend/work";
                    }
                })

            });


            $('.perMesg').mouseenter(function(){
                $(this).find('dd').addClass('showTrsm');
            }).mouseleave(function(){
                $(this).find('dd').removeClass('showTrsm');
            })
            //修改审核状态
            $("#uploadsave").on('click',function(){
                var item_id=$('#item_id').val();
                var task_id=$('#task_id').val();
                var id=$('#id').val();
                var files_div=$('#tuo_file_name div');
                var files="";
                var _Token="{{ csrf_token() }}";
                var comment=$('.updata_new_ins').val();
                files_div.each(function(){
                    files += $(this).attr('fileinfo')+",";
                });

                $.post('/backend/work/check',{id:id,item_id:item_id,task_id:task_id,files:files,comment:comment,_Token:_Token},function(data){
                    if(data==1){
                        alert("已通知相关人员处理！");
                        location.href="/backend/work";
                    }else {
                        alert("操作失败，请重试！");
                        location.href="/backend/work";
                    }
                })


            })
            //关闭弹窗
            $('#uploadsave').on('click',function(){
                $('#uploadmodal,#HOverlay').hide();
            });

        });
    </script>
        <!--middle-->
    <div class="mainWrapBox">
        <div class="mainBox">
			
    <div class="html">
        <div class="dashboard-title">2016-07-16，星期六 一天的工作从Xcube开始……<span style="float:right;margin-right:20px;"><a data-toggle="modal" data-target="#addcusPanel" onclick="getPanel()" href="javascript:void(0);">添加面板</a></span></div>
        <div class="dashboard-shortcut">
            <p><span class="title">快捷操作</span>
                <a href="" class="primarybtn btn-border-gray ml30">写日报</a>
                <a href="javascript:;" data-toggle="modal" data-target="#costPanel" class="primarybtn btn-border-gray ml30">记录支出</a>
                    <a href="" class="primarybtn btn-border-gray ml30" target="_blank">创建项目</a>
                    <a href="" class="primarybtn btn-border-gray ml30" target="_blank">创建线索</a>
                    <a href="" class="primarybtn btn-border-gray ml30" target="_blank">创建机会</a>
                    <a href="" class="primarybtn btn-border-gray ml30" target="_blank">创建合同</a>
                    <a href="" class="primarybtn btn-border-gray ml30" target="_blank">添加客户</a>

            </p>
            <p><span class="title">快速链接</span>
		                <a href="javascript:void(0)" id="k-s-l-j-1" data-target="#modalPanel_1" data-url="" data-toggle="quick_link" class="ml30 shortcut-link">• 费用支出明细</a>
		                <a href="javascript:void(0)" id="k-s-l-j-2" data-target="#modalPanel_2" data-url="" data-toggle="quick_link" class="ml30 shortcut-link">• 合同开票明细</a>
		                <a href="javascript:void(0)" id="k-s-l-j-7" data-target="#modalPanel_7" data-url="" data-toggle="quick_link" class="ml30 shortcut-link">• 合同回款明细</a>
		                <a href="javascript:void(0)" id="k-s-l-j-9" data-target="#modalPanel_9" data-url="" data-toggle="quick_link" class="ml30 shortcut-link">• 开票与回款</a>
		                <a href="javascript:void(0)" id="k-s-l-j-19" data-target="#modalPanel_19" data-url="" data-toggle="quick_link" class="ml30 shortcut-link">• 员工项目总表</a>
		                <a href="javascript:void(0)" id="k-s-l-j-20" data-target="#modalPanel_20" data-url="" data-toggle="quick_link" class="ml30 shortcut-link">• 项目收支总表</a>
            </p>
        </div>
        <div id="dashboard-link-container" class="dashboard-link-container" style="display: none">

        </div>
<ul id="dashboard-panel-container" class="dashboard-panel-container clearfix ui-sortable">


	 <li data="12" id="li_12" associate_id="445" sort="1" large_url="" url="user/panel/latelytask.htm" class="li-sort">
		 <div class="panel-item" id="dataGrid_12">
         <div class="header">近期我的任务
            <ul class="toolbar">
	            <li class="icon-move"></li>
	            <li id="init_large_12" class="icon-max"></li>
               <li id="init_small_12" style="display: none;" onclick="fangda(12,&#39;init_small_&#39;,&#39;width:48%&#39;, false)" class="icon-min"></li>
	           <li class="icon-delete" onclick="deleteAssocitate(12)"></li>
           </ul>
        </div>
<div class="body of300">
    <table style="margin:20px 0;line-height: 34px;height: 34px;width: 100%;">
       <tbody>
       @foreach($tasks as $k=>$v)
        <tr style="border: 1px solid  rgb(204, 204, 204);">
          <td width="30%">
            <div id="myproject">
                 <div class="project-name" style="width: 100px">#{{ $v['item_name'] }}</div>
                 <div class="project-people">商务经理：{{ $v['username'] }}</div>
            </div>
          </td>

          <td width="30%">
              @foreach($v['common'] as $item=>$value)
            <div id="over-time">
                <div class="time-item">
                    <span id="day_show_{{ $k.$item }}">0天</span>
                    <strong id="hour_show_{{ $k.$item }}">00时</strong>
                    <strong id="minute_show_{{ $k.$item }}">00分</strong>
                    <strong id="second_show_{{ $k.$item }}">00秒</strong>
                </div>
                <script>
                    var day1="day_show_{{ $k.$item }}";
                    var hour1="hour_show_{{ $k.$item }}";
                    var minute1="minute_show_{{ $k.$item }}";
                    var second1="second_show_{{ $k.$item }}";
                    var time="{{ strtotime($value['task_deadline'])-time() }}";
                    var intDiff = parseInt(time);//倒计时总秒数量
                    if(time >0){
                        timer(intDiff,day1,hour1,minute1,second1);
                    }
                </script>
            </div>
              @endforeach
          </td>
          <td width="30%">
              @foreach($v['common'] as $item=>$value)
            <div id="task-list">
                <p>
                    <img src="./images/gai.png">
                    <label data-id="{{$value['id']}}" data-item="{{ $value['item_id']}}" data-task="{{ $value['task_id']}}">{{ $value['task_name'] }}</label>
                    </p>
                </div>
                  @end
            </td>
            <td width="10%">
                @foreach($v['common'] as $item=>$value)
                <div id="task-check">
                    @if($value['member_id_check']==session('member')['uid'])
                        @if($value['task_status']==2)
                        <p>
                        <span>
                        <strong  class="check" data-action="yes"  data-id="{{$value['id']}}" data-item="{{ $value['item_id']}}" data-task="{{ $value['task_id']}}">通过</strong>
                    </span>
                            </p>
                <p>
                        <span>
                        <strong  class="check" data-action="no"  data-id="{{$value['id']}}" data-item="{{ $value['item_id']}}" data-task="{{ $value['task_id']}}">不通过</strong>
                    </span>
                    </p>
                            @else
                            <p>
                            <span>
                        <strong>{{ trans('items.task_status_check_'.$value['task_status']) }}</strong>
                    </span>
                            </p>
                        @endif
                        @else
                        @if($value['task_status']==1)
                            <p>
                    <span>
                        <strong  id="audit" data-id="{{$value['id']}}" data-item="{{ $value['item_id']}}" data-task="{{ $value['task_id']}}">{{ trans('items.task_status_'.$value['task_status']) }}</strong>
                    </span>
                            </p>
                            @else
                            <p>
                            <span>
                        <strong>{{ trans('items.task_status_'.$value['task_status']) }}</strong>
                    </span>
                            </p>
                            @endif
                        @endif
               </div>
                    @endforeach
        </td>

        </tr>
        @endforeach
    </tbody></table>
</div>

</div>
</li>

 <!--         -->
<li data="8" id="li_8" associate_id="41" sort="2" large_url="" url="user/panel/project_time.htm" class="li-sort">
 <div class="panel-item" id="dataGrid_8">	
 <div class="header">本月项目工时排名 · 全公司
 <ul class="toolbar">
	 <li class="icon-move"></li>
	 <li id="init_large_8" onclick="fangda(8,&#39;init_large_&#39;,&#39;width:100%&#39;, true)" class="icon-max"></li>
     <li id="init_small_8" style="display: none;" onclick="fangda(8,&#39;init_small_&#39;,&#39;width:48%&#39;, false)" class="icon-min"></li>
	 <li class="icon-delete" onclick="deleteAssocitate(8)"></li>
 </ul>

</div>
<div class="body of300">
 <!-- 内容 -->
</div>

</div>
</li>
<li data="15" id="li_15" associate_id="43" sort="3" large_url="" url="user/panel/oppstat.htm" class="li-sort">
<div class="panel-item" id="dataGrid_15">	
<div class="header">本月机会状态统计 · 全公司
<ul class="toolbar">
	<li class="icon-move"></li>
	<li id="init_large_15" onclick="fangda(15,&#39;init_large_&#39;,&#39;width:100%&#39;, true)" class="icon-max"></li>
    <li id="init_small_15" style="display: none;" onclick="fangda(15,&#39;init_small_&#39;,&#39;width:48%&#39;, false)" class="icon-min"></li>
	<li class="icon-delete" onclick="deleteAssocitate(15)"></li>
</ul>

</div>
<div class="body of300">
 <!-- 内容 -->
</div>
</div>
</li>

<li data="10" id="li_10" associate_id="444" sort="4" large_url="" url="user/panel/contract_remind.htm" class="li-sort">
<div class="panel-item" id="dataGrid_10">	
<div class="header">合同计划回款到期提醒 · 全公司
<ul class="toolbar">
	<li class="icon-move"></li>
	<li id="init_large_10" onclick="fangda(10,&#39;init_large_&#39;,&#39;width:100%&#39;, true)" class="icon-max"></li>
    <li id="init_small_10" style="display: none;" onclick="fangda(10,&#39;init_small_&#39;,&#39;width:48%&#39;, false)" class="icon-min"></li>
	<li class="icon-delete" onclick="deleteAssocitate(10)"></li>
</ul>
</div>
<div class="body of300">
<!-- 内容 -->
</div>
</div>
</li>

<li data="16" id="li_16" associate_id="44" sort="5" large_url="" url="user/panel/threadstat.htm" class="li-sort">
<div class="panel-item" id="dataGrid_16">	
<div class="header">本月线索状态统计 · 全公司
<ul class="toolbar">
	<li class="icon-move"></li>
	<li id="init_large_16" onclick="fangda(16,&#39;init_large_&#39;,&#39;width:100%&#39;, true)" class="icon-max"></li>
    <li id="init_small_16" style="display: none;" onclick="fangda(16,&#39;init_small_&#39;,&#39;width:48%&#39;, false)" class="icon-min"></li>
	<li class="icon-delete" onclick="deleteAssocitate(16)"></li>
</ul>
</div>
<div class="body of300">
<!-- 内容 -->
</div>
</div>
</li>


<li data="11" id="li_11" associate_id="446" sort="6" large_url="" url="user/panel/latelyworking.htm" class="li-sort">
<div class="panel-item" id="dataGrid_11">	
<div class="header">最近正在做
<ul class="toolbar">
	<li class="icon-move"></li>
	<li id="init_large_11" onclick="fangda(11,&#39;init_large_&#39;,&#39;width:100%&#39;, true)" class="icon-max"></li>
    <li id="init_small_11" style="display: none;" onclick="fangda(11,&#39;init_small_&#39;,&#39;width:48%&#39;, false)" class="icon-min"></li>
	<li class="icon-delete" onclick="deleteAssocitate(11)"></li>
</ul>
</div>
<div class="body of300">
 <!-- 内容 -->
</div>
</div>
</li>

<li data="13" id="li_13" associate_id="447" sort="7" large_url="" url="user/panel/workhours.htm" class="li-sort">
<div class="panel-item" id="dataGrid_13">	
<div class="header">我的工时
<ul class="toolbar">
	<li class="icon-move"></li>
	<li id="init_large_13" onclick="fangda(13,&#39;init_large_&#39;,&#39;width:100%&#39;, true)" class="icon-max"></li>
    <li id="init_small_13" style="display: none;" onclick="fangda(13,&#39;init_small_&#39;,&#39;width:48%&#39;, false)" class="icon-min"></li>
	<li class="icon-delete" onclick="deleteAssocitate(13)"></li>
</ul>
</div>
<div class="body of300">
<!-- 内容 -->
</div>
</div>
</li>


<li data="17" id="li_17" associate_id="449" sort="8" large_url="user/panel/priority_task.htm" url="user/panel/priority_task_widght.htm" class="li-sort">
<div class="panel-item" id="dataGrid_17">	
<div class="header">项目里程碑任务 · 全公司
<ul class="toolbar">
	<li class="icon-move"></li>
	<li id="init_large_17" onclick="fangda(17,&#39;init_large_&#39;,&#39;width:100%&#39;, true)" class="icon-max"></li>
    <li id="init_small_17" style="display: none;" onclick="fangda(17,&#39;init_small_&#39;,&#39;width:48%&#39;, false)" class="icon-min"></li>
	<li class="icon-delete" onclick="deleteAssocitate(17)"></li>
</ul>
</div>
<div class="body of300">
<!-- 内容 -->
</div>
</div>
</li>

<li data="14" id="li_14" associate_id="448" sort="9" large_url="" url="user/panel/latestdynamic.htm" class="li-sort">
<div class="panel-item" id="dataGrid_14">	
<div class="header">最新动态<span class="ml20 greenColor"></span>
<ul class="toolbar">
	<li class="icon-move"></li>
	<li id="init_large_14" onclick="fangda(14,&#39;init_large_&#39;,&#39;width:100%&#39;, true)" class="icon-max"></li>
    <li id="init_small_14" style="display: none;" onclick="fangda(14,&#39;init_small_&#39;,&#39;width:48%&#39;, false)" class="icon-min"></li>
	<li class="icon-delete" onclick="deleteAssocitate(14)"></li>
</ul>
</div>
<div class="body" style="overflow-x: hidden">
<!-- 内容 -->
</div>
</div>
</li>

<li data="3" id="li_3" associate_id="1150" sort="10" large_url="" url="user/panel/monthcost.htm" class="li-sort">
<div class="panel-item" id="dataGrid_3">	
<form id="queryForm">
    <input type="hidden" id="year" name="year" value="2016">
</form>
<div class="header">月度成本统计
        <span class="primarybtn btn-border-gray ml30" id="yearSpan" onclick="WdatePicker({dateFmt: &#39;yyyy&#39;, isShowToday: false, isShowClear: false,qsEnabled:false,isShowOK:false,onpicked:selectYear});">2016</span>
    <span class="primarybtn btnGreen " id="excelData" style="display: none;">导出Excel</span>
<ul class="toolbar">
	<li class="icon-move"></li>
	        <li id="init_large_3" onclick="fangda(3,&#39;init_large_&#39;,&#39;width:100%&#39;, true)" class="icon-max"></li>
        <li id="init_small_3" style="display: none;" onclick="fangda(3,&#39;init_small_&#39;,&#39;width:48%&#39;, false)" class="icon-min"></li>
	<li class="icon-delete" onclick="deleteAssocitate(3)"></li>
</ul>
</div>
<div class="body of300">
<!-- 内容 -->
</div>
</div>
</li>

<li data="4" id="li_4" associate_id="1151" sort="11" large_url="" url="user/panel/new_contracts.htm" class="li-sort">
<div class="panel-item" id="dataGrid_4">	
<div class="header">月度新增合同额 · 全公司
<ul class="toolbar">
	<li class="icon-move"></li>
	<li id="init_large_4" onclick="fangda(4,&#39;init_large_&#39;,&#39;width:100%&#39;, true)" class="icon-max"></li>
    <li id="init_small_4" style="display: none;" onclick="fangda(4,&#39;init_small_&#39;,&#39;width:48%&#39;, false)" class="icon-min"></li>
	<li class="icon-delete" onclick="deleteAssocitate(4)"></li>
</ul>
</div>
<div class="body of300">
<!-- 内容 -->
</div>
</div>
</li>

<li data="6" id="li_6" associate_id="1152" sort="12" large_url="" url="user/panel/invoice_payment.htm" class="li-sort">
<div class="panel-item" id="dataGrid_6">	
<div class="header">月度开票与回款统计 · 全公司
<ul class="toolbar">
	<li class="icon-move"></li>
	<li id="init_large_6" onclick="fangda(6,&#39;init_large_&#39;,&#39;width:100%&#39;, true)" class="icon-max"></li>
    <li id="init_small_6" style="display: none;" onclick="fangda(6,&#39;init_small_&#39;,&#39;width:48%&#39;, false)" class="icon-min"></li>
	<li class="icon-delete" onclick="deleteAssocitate(6)"></li>
</ul>
</div>
<div class="body of300">
<!-- 内容 -->
</div>


</div>
</li>

<li data="21" id="li_21" associate_id="1153" sort="13" large_url="user/panel/hours_and_task_modal.htm" url="user/panel/hours_and_task.htm" class="li-sort">
<div class="panel-item" id="dataGrid_21">	
<div class="header">员工工时与任务统计 · 全公司
<ul class="toolbar">
	<li class="icon-move"></li>
	<li id="init_large_21" onclick="fangda(21,&#39;init_large_&#39;,&#39;width:100%&#39;, true)" class="icon-max"></li>
    <li id="init_small_21" style="display: none;" onclick="fangda(21,&#39;init_small_&#39;,&#39;width:48%&#39;, false)" class="icon-min"></li>
	<li class="icon-delete" onclick="deleteAssocitate(21)"></li>
</ul>
</div>
<div class="body of300">
<!-- 内容 -->
</div>
</div>
</li>

<li data="18" id="li_18" associate_id="1539" sort="14" large_url="" url="user/panel/warning_project.htm" class="li-sort">
<div class="panel-item" id="dataGrid_18">	        
<div class="header">预警项目列表 · 全公司
<ul class="toolbar">
	<li class="icon-move"></li>
	<li id="init_large_18" onclick="fangda(18,&#39;init_large_&#39;,&#39;width:100%&#39;, true)" class="icon-max"></li>
    <li id="init_small_18" style="display: none;" onclick="fangda(18,&#39;init_small_&#39;,&#39;width:48%&#39;, false)" class="icon-min"></li>
	<li class="icon-delete" onclick="deleteAssocitate(18)"></li>
</ul>
</div>
<div class="body of300">
 <!-- 内容 -->       
</div>
</div>
</li>
</ul>
</div>
</div>
<div class="modal-task" id="taskPanel" style="right:-550px">
   <div class="task-title line-break">
   <span>CAD图稿</span>
   <div class="task-title-menu"><img src="./images/menu.png"></div>
   <div class="task-title-close"><img src="./images/close.png"></div>
   </div>
   <div class="task-content modal-body clearfix task-detail">
        <div class="task-info">
            <div class="task-time">倒计时：XXXXXXXXX</div>
            <div class="task-great">
            <table>
               <tr>
                   <td>分配绩效</td>
                   <td>3000</td>
               </tr>
               <tr>
                   <td>实际绩效</td>
                   <td>2000</td>
               </tr>
            </table>
            </div>
            <div class="task-assess">
               <p>综合评分</p>
               <p>4.5</p>
            </div>
            <div class="task-assess-list">
              <div><label>质量</label><span>★</span><span>★</span><span>★</span><span>★</span><span>☆</span></div>
              <div><label>服务</label><span>★</span><span>★</span><span>★</span><span>★</span><span>☆</span></div>
              <div><label>速度</label><span>★</span><span>★</span><span>★</span><span>★</span><span>☆</span></div>
            </div>
        </div>    
        <div class="task-doc mt10 line-break line-height30 clearfix">
          <div class="title" style="line-height:30px">
          项目文档
          </div>
            <div>
           <table width="100%">
              <tbody id="upload_text">


              </tbody>
           </table>
          </div>
        </div>
        <div class="task-activity  mt10 line-break line-height30 clearfix">
          <div class="title" style="line-height:30px">
                <div class="title-text title">项目记录</div>
                <div class="title-text title">反馈意见</div>
          </div>
          <table width="530px">
          <tbody id="logs">


          </tbody>     
          </table>
        </div>
   </div>
</div>

<!-- 上传组件 start -->
   <div class="modal" id="uploadmodal" style="display:none">
            <form id="upload_Form" enctype="multipart/form-data" method="post">
               {{-- <input type="hidden" id="upload_orgId" name="orgId">
                <input type="hidden" id="upload_userId" name="userId">
                <input type="hidden" id="upload_userName" name="userName">
                <input type="hidden" id="upload_pidStr" name="pidStr">
                <input type="hidden" id="upload_nodeId" name="nodeId">
                <input type="hidden" id="upload_uploadType" name="uploadType">
                <input type="hidden" id="upload_uuid" name="uuid">
                <input type="hidden" id="upload_headVersion" name="headVersion">
                <input type="hidden" id="upload_fileSize" name="fileSize">
                <input type="hidden" id="upload_fileName" name="fileName">
                <input type="hidden" id="upload_contentType" name="contentType">
                <input type="hidden" id="upload_filePath" name="pathFile">
                <input type="hidden" id="upload_previewFile" name="previewFile">--}}
                <input type="hidden" id="item_id" name="item_id">
                <input type="hidden" id="task_id" name="task_id">
                <input type="hidden" id="id" name="id">

                <div data="check" class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header ">
                            <span class="modal-title"><em></em> </span>
     
                        </div>

                        <div class="modal-body" style="padding:15px">

                            <div class="juese_text_cont_input fontsize16">
                                <div class="updata_new_text upload_new_version">
                                    <label id="a-upload">添加本地文件</label>
                                </div>
                                <div style="margin-top: 5px;" id="tuo_file_name"></div>
                                <input type="hidden" id="upload_tuo_type">
                                <input type="text" class="updata_new_ins" placeholder="添加备注">
                            </div>

                        </div>
                        <div class="modal-footer" style="display:block;">         
                            <input type="button" id="uploadsave" class="btn green" value="保存">
                        </div>
                        <div class="cl"></div>
                    </div>
                </div>
            </form>
      </div>
    </div>
</div>


</div>

</div>
    <script src="/assets/backend/js/jquery.hDialog.min.js"></script>
    <script src="/assets/backend/js/webuploader.js"></script>
    <script src="/assets/backend/js/uploadFiles.js"></script>


<script type="text/javascript">
  $('#task-list label').click(function(){
      $('#taskPanel').animate({
        right:'0px',
    });
    var item_id=$(this).data('item');
    var task_id=$(this).data('id');
      var _Token="{{ csrf_token() }}";
      //alert(task_id);
      $.post('/backend/work/accessory',{item_id:item_id,task_id:task_id,_Token:_Token},function(data){
          var data=data;
          var task_name=data.name;
            var task_deadline=data.deadline;
            var accessorys=data.accessorys;
          var logs=data.logs;
         $('.task-title span').text(task_name);
          $('.task-time').text('截止时间：'+task_deadline);
          var html="";
          var ht="";

          $.each(accessorys,function(i,item){
              html += "<tr><td width='50%'>"+item.path.replace(',','')+"</td> <td width='50%' style='float:right'>"+item.created_at+"</td> </tr>";
          });
          $('#upload_text').empty();
          $('#upload_text').append(html);
          $.each(logs,function(i,item){
              ht += "<tr><td><span>"+item.created_at+"</span>"+item.action+"</td><td>"+item.comment+"</td></tr>";
          });
          $('#logs').empty();
          $('#logs').append(ht);

      },'json')

  });
  $('.task-title-close').click(function(){
    $('#taskPanel').animate({
        right:'-550px',
    });
  });

  function openuploadmodal(obj) {
    $(obj).hDialog({
       box:'#uploadmodal',
       width:520,
       positions: 'top',
       modalHide: false,
       closeBg: '#fff',
     }); //默认调用
}
  $('#audit').click(function(){
     var item_id=$(this).data('item');
     var task_id=$(this).data('task');
      var id=$(this).data('id');
     $('#item_id').val(item_id);
     $('#task_id').val(task_id);
     $('#id').val(id);
  })
openuploadmodal('#audit');
</script>

<script type="text/javascript">
    $(function(){
        var uplodFileNum = 10 ;
        var fileNum ;
        var uploaderObj ;
        uploaderObj = new uploaderFile('tuo_file_name','a-upload');
        uploaderObj.options.fileNumLimit = undefined;
        uploaderObj.options.fileSizeLimit= undefined;
        uploaderObj.options.fileSingleSizeLimit = 30 * 1024 * 1024;
        uploaderObj.options.duplicate  = true;
        var createDate = '';
    
})
</script>
    @endsection
